package OnTheBeachDB::Forum;

use base qw/DBIx::Class/;

# Load required DBIC stuff
__PACKAGE__->load_components(qw/PK::Auto Core/);

# Set the table name
__PACKAGE__->table('forums');

# Set columns in table
__PACKAGE__->add_columns(qw/forum_id name description image/);

# Set the primary key for the table
__PACKAGE__->set_primary_key(qw/forum_id/);

## relationships
__PACKAGE__->has_many(
	"forum_posts" => "OnTheBeachDB::ForumPost",
	"forum_id"
);
__PACKAGE__->many_to_many( "posts" => "forum_posts", "message_id" );

=head1 NAME
    
    OnTheBeachDB::Forums - A model object representing a forum.
    
=head1 DESCRIPTION
  
=cut

1;
